home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / segue.exe / NSPOOL.PRG < prev    next >
Text File  |  1991-10-29  |  2KB  |  51 lines

  1. *.............................................................................
  2. *
  3. *   Program Name: NSPOOL.PRG        Copyright: HRF Associates, Inc.
  4. *   Date Created: 10/29/11           Language: Clipper
  5. *   Time Created: 01:37:01             Author: Bob Fogle
  6. *
  7. *.............................................................................
  8. * Supplemental SEGUE function for starting or stopping spool capture, or to add file to spool queue.
  9. * Functionally equivilent to N_SPOOL function in NETLIB library with the exception that
  10. * when a file name is specified, the file name indicates a capture file name that can
  11. * be printed later with NPRINT.
  12. *
  13. FUNCTION NSPOOL_
  14. * Purpose: To set spooler timeout value in seconds.
  15. * Usage     : NSPOOL_([ON|OFF|<expC>])
  16. *        :
  17. * Where  : <expC> = Filename for placing file into the spool queue.
  18. *        :      0 = no timeout.
  19. *        :
  20. PARAMETERS splr
  21. LOCAL msplr
  22. PRIVATE rtn :=0
  23.  
  24. do while .t.
  25.   * Check to make sure passed variable types are correct.
  26.   if valtype(splr)<>'C' .AND. splr<>nil
  27.     rtn = -101
  28.     exit
  29.   endi
  30.  
  31.   * Set up defaults
  32.   msplr =  if(valtype(splr)=='C',uppe(alltrim(splr)),nil)
  33.  
  34.   * Get/Set spooler timeout
  35.   if pcount()=0                    // If no arguments, return current setting.
  36.     rtn1 = PRDFCAFS()              // Get LPT Capture Status
  37.     rtn=if(rtn1=0,.F.,.T.)
  38.   elseif msplr = "ON"
  39.     rtn = PRDFCASR() // Start LPT Capture
  40.   elseif msplr = "OFF"
  41.     rtn = PRDFCAEN() // End LPT Capture
  42.   else
  43.     rtn = PRFLCA(DRDVHN(),msplr)    // Get Directory Handle, Specify Capture File
  44.   endi
  45.   exit
  46. endd
  47. RETURN rtn
  48.  
  49.  
  50.  
  51.